package cuiweiyou.headerrecycleview.fragment;

import android.annotation.SuppressLint;
import android.content.Context;
import android.os.Bundle;


import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;

import cuiweiyou.headerrecycleview.R;

@SuppressLint("ValidFragment")
public class FragmentOne extends Fragment {
   private Context mContext;
   TextView tvHead ;
   String head;

    public FragmentOne(Context context,String s) {
        super();
        mContext=context;
        head=s;
    }

    @Override
    public void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
    }


    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable  ViewGroup container, Bundle savedInstanceState) {
        View view=inflater.inflate(R.layout.fragment_one,null);
        tvHead = (TextView) view.findViewById(R.id.tv_head);
        tvHead.setText(head);

        return view;
    }

    @Override
    public void onViewCreated(View view, @Nullable  Bundle savedInstanceState) {
        super.onViewCreated(view, savedInstanceState);
    }

    @Nullable
    @Override
    public View getView() {
        return super.getView();
    }
}
